import getApiData from "@/services/cpasRequest";
import notify from 'devextreme/ui/notify';

// 获取账套
export async function getAccountInfo(params: {
    dbname: string;
  }) {
    const res = await getApiData("account.accountInfo.getDataList", params);
    if (res.ok) {
      return res.data;
    }
    return {};
  }

// 重新计算报表项目数据
// account.reportItem.reCal
export async function reCalReportItemsData(params: {
  dbname: string;
  Data_ID: string;
  userName: any;
}) {
  const res = await getApiData("account.reportItem.reCal", params);
  if (res.ok) {
    notify("重新计算报表项目数据成功",'Success',2000)
    return res.ok;
  }
  return {};
}